package com.esoon.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * COS_TENANT
 * @author 
 */
@Data
public class CosTenant implements Serializable {
    /**
     * PK
     */
    private BigDecimal ttId;

    /**
     * 租户编号
     */
    private String ttCode;

    /**
     * 租户名称
     */
    private String ttName;

    /**
     * 租户状态
     */
    private String ttState;

    /**
     * 过期时间
     */
    private Date ttTime;

    /**
     * 关联数据源: COS_DATA_BASE.DB_ID
     */
    private BigDecimal ttDatabase;

    /**
     * 租户模块
     */
    private String ttFunction;

    /**
     * 租户备注
     */
    private String ttDesc;

    /**
     * 创建人
     */
    private BigDecimal createId;

    /**
     * 创建人
     */
    private String creater;

    /**
     * 部门编号
     */
    private BigDecimal createDept;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新人
     */
    private BigDecimal updateId;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 更新时间
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CosTenant other = (CosTenant) that;
        return (this.getTtId() == null ? other.getTtId() == null : this.getTtId().equals(other.getTtId()))
            && (this.getTtCode() == null ? other.getTtCode() == null : this.getTtCode().equals(other.getTtCode()))
            && (this.getTtName() == null ? other.getTtName() == null : this.getTtName().equals(other.getTtName()))
            && (this.getTtState() == null ? other.getTtState() == null : this.getTtState().equals(other.getTtState()))
            && (this.getTtTime() == null ? other.getTtTime() == null : this.getTtTime().equals(other.getTtTime()))
            && (this.getTtDatabase() == null ? other.getTtDatabase() == null : this.getTtDatabase().equals(other.getTtDatabase()))
            && (this.getTtFunction() == null ? other.getTtFunction() == null : this.getTtFunction().equals(other.getTtFunction()))
            && (this.getTtDesc() == null ? other.getTtDesc() == null : this.getTtDesc().equals(other.getTtDesc()))
            && (this.getCreateId() == null ? other.getCreateId() == null : this.getCreateId().equals(other.getCreateId()))
            && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater()))
            && (this.getCreateDept() == null ? other.getCreateDept() == null : this.getCreateDept().equals(other.getCreateDept()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateId() == null ? other.getUpdateId() == null : this.getUpdateId().equals(other.getUpdateId()))
            && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTtId() == null) ? 0 : getTtId().hashCode());
        result = prime * result + ((getTtCode() == null) ? 0 : getTtCode().hashCode());
        result = prime * result + ((getTtName() == null) ? 0 : getTtName().hashCode());
        result = prime * result + ((getTtState() == null) ? 0 : getTtState().hashCode());
        result = prime * result + ((getTtTime() == null) ? 0 : getTtTime().hashCode());
        result = prime * result + ((getTtDatabase() == null) ? 0 : getTtDatabase().hashCode());
        result = prime * result + ((getTtFunction() == null) ? 0 : getTtFunction().hashCode());
        result = prime * result + ((getTtDesc() == null) ? 0 : getTtDesc().hashCode());
        result = prime * result + ((getCreateId() == null) ? 0 : getCreateId().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getCreateDept() == null) ? 0 : getCreateDept().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateId() == null) ? 0 : getUpdateId().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ttId=").append(ttId);
        sb.append(", ttCode=").append(ttCode);
        sb.append(", ttName=").append(ttName);
        sb.append(", ttState=").append(ttState);
        sb.append(", ttTime=").append(ttTime);
        sb.append(", ttDatabase=").append(ttDatabase);
        sb.append(", ttFunction=").append(ttFunction);
        sb.append(", ttDesc=").append(ttDesc);
        sb.append(", createId=").append(createId);
        sb.append(", creater=").append(creater);
        sb.append(", createDept=").append(createDept);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateId=").append(updateId);
        sb.append(", updater=").append(updater);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}